<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>使用arc()方法绘制一条弧线</title>
<style type="text/css">
canvas {
	border:1px solid #000;
}
</style>
<script type="text/javascript">
function Draw(){
	var canvas=document.getElementById("canvas");
	var context = canvas.getContext("2d");
	// 先绘制一个灰色的圆形
	context.beginPath();
	context.arc(120,120,80,0,Math.PI*2,true);	
	context.fillStyle="rgba(0,0,0,0.1)";
	context.fill();
	// 再绘制一条圆弧，宽5像素，线条颜色为橘黄色
	context.beginPath();
	context.arc(120,120,80,0,(-Math.PI*2/3),true);	
	context.strokeStyle="rgba(255,135,0,1)";
	context.lineWidth=5;
	context.stroke();
}
window.addEventListener("load",Draw,true);
</script>
</head>
<body style="overflow:hidden">
<canvas id="canvas" width="400" height="400">你的浏览器不支持该功能！</canvas>
</body>
</html>
